Skip to content

Rewrote script in PHP to fix various errors from redis. Also faster#3

Open
aziraphale wants to merge 1 commit intorenasboy:masterfrom
aziraphale:php-version
Open

Rewrote script in PHP to fix various errors from redis. Also faster#3
aziraphale wants to merge 1 commit intorenasboy:masterfrom
aziraphale:php-version

Conversation

@aziraphale
Copy link
Copy Markdown

I was having some problems running this script - I would get various errors back from redis that seemed to suggest that the line length specified for the data line was incorrect. This mostly/entirely happened with sessions created by phpMyAdmin - i.e. very long files, with lots of complex PHP serialization strings.

I tried to fix the bash script for a while, but there were parts where I wasn't confident about what was going on, so I rewrote the whole thing in PHP (which I figured was fine in this case, since it's a PHP-related script, so anyone wanting to run it would probably already have PHP installed). My PHP version not only migrates my ~600 sessions flawlessly, without getting stuck on the phpMyAdmin sessions, but it also runs a lot faster (I'm seeing it execute in under 1 second for ~600 sessions, while the original script took around 4-5 seconds to run).

@renasboy
Copy link
Copy Markdown
Owner

hey man, its all GREAT that you fixed it, however I stop working with PHP and this script it not in use (by me anymore), feel free to fork it and apply your changes to it !!

@aziraphale
Copy link
Copy Markdown
Author

That's cool, no worries :) I figure that having this pull request here may help people find my version if they have the same problems that I did. No need to merge it or anything :)

@renasboy
Copy link
Copy Markdown
Owner

Yep you are right? coolio, nice work !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants